package com.kakarote.admin.entity.PO;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 企业微信工作台订单表
 * </p>
 *
 * @author xuepengfei
 * @since 2022-11-10
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("wk_admin_cp_order")
@ApiModel(value = "AdminCpOrder对象", description = "企业微信工作台订单")
public class AdminCpOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("订单id")
    private String orderId;

    @ApiModelProperty("订单状态。0-待支付，1-已支付，2-已取消， 3-支付过期， 4-申请退款中， 5-退款成功， 6-退款被拒绝")
    private Integer orderStatus;

    @ApiModelProperty("订单类型。0-新购应用，1-扩容应用人数，2-续期应用时间，3-变更版本")
    private Integer orderType;

    @ApiModelProperty("应付价格")
    private BigDecimal price;

    @ApiModelProperty("本次订单扩容之后的人数")
    private Integer userCount;

    @ApiModelProperty("购买的时长，单位为天")
    private Integer orderPeriod;

    @ApiModelProperty("下单时间")
    private LocalDateTime orderTime;

    @ApiModelProperty("付款时间")
    private LocalDateTime paidTime;

    @ApiModelProperty("购买生效期的开始时间")
    private LocalDateTime beginTime;

    @ApiModelProperty("购买生效期的结束时间")
    private LocalDateTime endTime;

}
